import {RequestUtil} from '@/utils'

export class WorkHttp {
    static PREFIX = "/manager/work"
    // 工单管理

    static getOrderPageList =  (params: Record<string, any>) => RequestUtil.getAjax(`${this.PREFIX}/pig/order/pageList` ,params)

    static addOrder = (data: Record<string, any>) => RequestUtil.postAjax(`${this.PREFIX}/pig/order/add`, data)

    static assignOrder = (id: string | number, code: string) => RequestUtil.putAjax(`${this.PREFIX}/pig/order/assign/${id}/${code}`)

    static delOrder = (data: any[]) => RequestUtil.delAjax(`${this.PREFIX}/pig/order/delete`, data)


    // 喂养
    static getOrderFoodsPageList =  (params: Record<string, any>) => RequestUtil.getAjax(`${this.PREFIX}/pig/orderFoods/pageList` ,params)


    // 管家管理

    static getStaffPageList =  (params: Record<string, any>) => RequestUtil.getAjax(`${this.PREFIX}/basic/staff/pageList` ,params)

    static addStaff = (data: Record<string, any>) => RequestUtil.postAjax(`${this.PREFIX}/basic/staff/add`, data)

    static updateStaff = (id: string | number, data: Record<string, any>) => RequestUtil.putAjax(`${this.PREFIX}/basic/staff/update/${id}`, data)

    static delStaff = (data: any[]) => RequestUtil.delAjax(`${this.PREFIX}/basic/staff/delete`, data)

}
